home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’95
/
Reminder Manager
/
Lose.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-24
|
2KB
|
50 lines
#include "Lose.h"
// Turning off the following two defines is the only bit of this
// code that's changed since 1989...
//#define TRUE 1
//#define FALSE 0
#define NIL 0
#define I_AARGH 1
#define I_x 2
void A_Lose()
{
AlertTHndl AlertResHandle;
Rect tempRect;
short itemHit;
AlertResHandle = (AlertTHndl)GetResource('ALRT', 4);
HLock((Handle)AlertResHandle);
tempRect.left = (*AlertResHandle)->boundsRect.left;
tempRect.right = (*AlertResHandle)->boundsRect.right;
tempRect.top = (*AlertResHandle)->boundsRect.top;
tempRect.bottom = (*AlertResHandle)->boundsRect.bottom;
tempRect.top = ((qd.screenBits.bounds.bottom - qd.screenBits.bounds.top)
- (tempRect.bottom - tempRect.top)) / 3;
tempRect.left = ((qd.screenBits.bounds.right - qd.screenBits.bounds.left)
- (tempRect.right - tempRect.left)) / 2;
tempRect.bottom = tempRect.top
+ ((*AlertResHandle)->boundsRect.bottom
- (*AlertResHandle)->boundsRect.top);
tempRect.right = tempRect.left
+ ((*AlertResHandle)->boundsRect.right
- (*AlertResHandle)->boundsRect.left);
(*AlertResHandle)->boundsRect.left = tempRect.left;
(*AlertResHandle)->boundsRect.right = tempRect.right;
(*AlertResHandle)->boundsRect.top = tempRect.top;
(*AlertResHandle)->boundsRect.bottom = tempRect.bottom;
/* Let the OS handle the Alert and wait for a result to be returned */
itemHit = StopAlert(4, NIL);
HUnlock((Handle)AlertResHandle);
if (I_AARGH == itemHit) {}
/* ?? PLACE YOUR CODE HERE */
} /* End of this Alert function */